function sm(params, c1, c2) {
	let obj = {
		confirmText: '确定',
		cancelText: '取消',
	}
	params = {
		...obj,
		...params
	}
	let plat = uni.getSystemInfoSync().platform;
	if (plat == 'android') {
		[params.confirmText, params.cancelText] = [params.cancelText, params.confirmText]
	}
	uni.showModal({
		...params,
		success: res => {
			if (plat == 'android') {
				if (!res.confirm) {
					c1 && c1();
				} else {
					c2 && c2()
				}
			} else {
				if (res.confirm) {
					c1 && c1();
				} else {
					c2 && c2()
				}
			}
		}
	})
}

export default sm;